package com.yonyou.crm.sact.schedule.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.yonyou.crm.common.biz.service.BaseBizServiceImpl;
import com.yonyou.crm.sact.schedule.entity.ScheduleTaskcardVO;

@Service
public class ScheduleTaskcardBizServiceImpl extends BaseBizServiceImpl<ScheduleTaskcardVO>{
	
	public ScheduleTaskcardVO save(ScheduleTaskcardVO vo){
		return super.saveVO(vo);
	}
	
	public int update(ScheduleTaskcardVO vo){
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("scheduleId", vo.getScheduleId());
		param.put("scheduleType", vo.getScheduleType());
		param.put("objType", vo.getObjType());
		param.put("objBiztype", vo.getObjBiztype());
		param.put("written", vo.getWritten());
		return dao.updateSql(ScheduleTaskcardVO.class, "updateTaskcardStatus", param);
	}
	
	public void batchSave(List<ScheduleTaskcardVO> scheduleTaskcardList){
		dao.saveSql(ScheduleTaskcardVO.class, "batchInsert", scheduleTaskcardList);
	}

	public List<ScheduleTaskcardVO> getList(Map<String, Object> param){
		return dao.selectVoList(ScheduleTaskcardVO.class, "getScheduleTaskcardList", param);
	}
}
